package com.playball.lottery.frm.set;

import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.TextView;

import com.githang.statusbar.StatusBarCompat;
import com.playball.lottery.R;
import com.playball.lottery.base.BaseActivity;
import com.playball.lottery.util.SysApplication;


public class HelpActivity extends BaseActivity {

	private WebView webview;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.set_about);
		StatusBarCompat.setStatusBarColor(this, Color.RED, true);
		SysApplication.getInstance().addActivity(this);
		TextView textView=(TextView)findViewById(R.id.top_title_info);
		textView.setText("玩法介绍");
		Button buttons= (Button) findViewById(R.id.top_title_refres);
		buttons.setVisibility(View.GONE);
		Button button= (Button) findViewById(R.id.top_title_back);
		button.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});

		webview = (WebView) findViewById(R.id.set_about_WebView01);
		// 开启javascript支持
		webview.getSettings().setJavaScriptEnabled(true);
		webview.getSettings().setSupportZoom(false);
		// 安卓1.6不支持setAppCacheEnabled
		// webview.getSettings().setAppCacheEnabled(false);
		webview.getSettings().setAllowFileAccess(true);

		// -----打开本包内asset目录下的index.html文件
		// wView.loadUrl(" file:///android_asset/index.html ");
		webview.loadUrl("file:///android_asset/help.html");
		// -----打开本地sd卡内的index.html文件
		// wView.loadUrl("content://com.android.htmlfileprovider/sdcard/index.html");
		// -----打开指定URL的html文件
		// wView.loadUrl(" http://wap.cmdn.net");

	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		super.finish();
		SysApplication.getInstance().removeActivity(this);
	};

	public void onResume() {
		super.onResume();
		
	}

	public void onPause() {
		super.onPause();
		
	}
}
